package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDate;
import java.util.List;

/**
 * 采购订单实体类
 */
@TableName("t_po")
public class PurchaseOrderBean {
    /**采购订单编号*/
    @TableId(value = "pk_poId",type = IdType.AUTO)
    private Integer poId;
    /**供应商名称*/
    @TableField("p_supplier")
    private String supplierName;
    /**采购员*/
    @TableField("p_realName")
    private String realName;
    /**采购时间*/
    @TableField("p_poDate")
    private LocalDate poDate=LocalDate.now();
    /**采购物品明细集合*/
    @TableField(exist = false)
    private List<OrderPInfoBean> orderPInfoList;

    public PurchaseOrderBean() {
    }

    public PurchaseOrderBean(String supplierName, String realName) {
        this.supplierName = supplierName;
        this.realName = realName;
    }

    public Integer getPoId() {
        return poId;
    }

    public void setPoId(Integer poId) {
        this.poId = poId;
    }

    public String getSupplierName() {
        return supplierName;
    }

    public void setSupplierName(String supplierName) {
        this.supplierName = supplierName;
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public LocalDate getPoDate() {
        return poDate;
    }

    public void setPoDate(LocalDate poDate) {
        this.poDate = poDate;
    }

    public List<OrderPInfoBean> getOrderPInfoList() {
        return orderPInfoList;
    }

    public void setOrderPInfoList(List<OrderPInfoBean> orderPInfoList) {
        this.orderPInfoList = orderPInfoList;
    }

    @Override
    public String toString() {
        return "PurchaseOrderBean{" +
                "poId=" + poId +
                ", supplierName='" + supplierName + '\'' +
                ", realName='" + realName + '\'' +
                ", poDate=" + poDate +
                ", orderPInfoList=" + orderPInfoList +
                "}\n";
    }
}
